using System;
using System.Collections.Generic;

namespace LannyPractiseCode
{
    /// <summary>
    /// 通过静态类方法
    /// </summary>
    public class Singleton4
    {
        private static class SingletonInstance
        {
            public static Singleton4 INSTANCE=new Singleton4();
        }
        //02.构造私有化
        private Singleton4() { }
        //03.提供外部访问的接口   返回当前类的对象
        public static Singleton4 getInstance()
        {
            return SingletonInstance.INSTANCE;
        }
    }
}